package com.kenliang.javase.gc;

import com.kenliang.javase.bean.Student;

/**
 * @author KenLiang
 * @description:搞不懂，// TODO: 2019/8/15  ，，，没有任何结论，，怎么能有利于与gc
 * @date Created in 5:44 PM 2019/5/20.
 */
public class ObjectGc {


    public static void main(String[] args) {
        testGc();
    }

    public static void testGc() {
        String[] strs = {"aaa", "bbb", "ccc"};
        Student student1 = new Student(strs);
        Student student3 = new Student(strs);
        System.gc();
        student1.setNull();
        student3.setNull();
        strs = null;
        System.gc();
    }
}
